package com.yule;

import org.apache.activemq.command.ActiveMQQueue;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableTransactionManagement

@MapperScan("com.yule.*.dao")
@ComponentScan("com.yule.*.home")
@ComponentScan("com.yule.controller.*")
@ComponentScan("com.yule.mq.*")
public class YuleSystemApplication {

    private static Logger logger = LoggerFactory.getLogger(YuleSystemApplication.class);

    @Bean
    public ActiveMQQueue queue() {
        return new ActiveMQQueue("SystemLog");
    }

    public static void main(String[] args) throws Exception {
        //System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(YuleSystemApplication.class, args);
        logger.info("============= yule-web Start Success =============");
    }

}
